import QtQuick 1.1
import com.nokia.meego 1.1

Page {
    id: aboutPage

    orientationLock: PageOrientation.LockPortrait
    anchors { fill: parent; margins: UiConstants.DefaultMargin }

    Image {
        id: appIcon
        source: "file:/usr/share/icons/hicolor/80x80/apps/tripAccounts80.png"
        anchors { top: parent.top; horizontalCenter: parent.horizontalCenter }
        //visible: (rootWindow.pageStack.depth !== 1) ? true : false
    }

    Label {
        id: appName
        anchors {
            top: appIcon.bottom
            topMargin: UiConstants.DefaultMargin
            horizontalCenter: parent.horizontalCenter
        }

        text: "tripAccounts" + " Ver " + "0.0.3\n"
        //visible: (rootWindow.pageStack.depth !== 1) ? true : false
    }

    Column {
        id: buttonsColumn
        spacing: 5
        anchors { bottom: parent.bottom; horizontalCenter: parent.horizontalCenter }
        //visible: (rootWindow.pageStack.depth !== 1) ? true : false

        Button {
            text: "Website"

            onClicked: Qt.openUrlExternally("https://projects.developer.nokia.com/tripAccounts")
        }

        Button {
            text: "Close"

            onClicked: {
                pageStack.pop();
            }
        }
    }

    Flickable {
        id: flickText

        clip: true
        contentHeight: helpText.height

        anchors {
            top: appName.bottom;
            bottom: buttonsColumn.top
            bottomMargin: UiConstants.DefaultMargin
            left: parent.left
            right: parent.right
        }

        Column {
            id: helpText
            width: aboutPage.width

            Label {
                width: parent.width
                textFormat: Text.RichText
                wrapMode: Text.WordWrap
                //visible: (rootWindow.pageStack.depth !== 1) ? true : false
                text: "This app helps to keep track of various expenses incurred by a group of people during a trip. "
                      + "Each group is assigned an account name & default number of persons in that group. "
                      + "Expenses can be added along the trip with varying splits among the groups and with different currency rates. "
                      + "There is a screen for viewing the expense summary and also one for detailed report."
                      //+ "This is an app for managing multiple accounts when you go for a trip with friends & family. "
                      //+ "It helps to track the various expenses during the trip, and settle the bills at the end of the trip."
            }

        }
    }

    //! Scroll decorator for the flickable area
    ScrollDecorator {
        flickableItem: flickText
    }

}
    
